package com.ydx.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ydx.entity.Patrol;
import com.ydx.entity.PatrolAndShiyanshi;
import com.ydx.service.PatrolService;
import com.ydx.mapper.PatrolMapper;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author zero
* @description 针对表【patrol】的数据库操作Service实现
* @createDate 2024-06-19 10:03:07
*/
@Service
public class PatrolServiceImpl extends ServiceImpl<PatrolMapper, PatrolAndShiyanshi>
    implements PatrolService{

    @Resource
    private PatrolMapper patrolMapper;

    @Override
    public List<PatrolAndShiyanshi> selectMore() {
        return patrolMapper.selectMore();
    }

    @Override
    public List<PatrolAndShiyanshi> selectWodePatrol(int userid) {
        return patrolMapper.selectWodePatrol(userid);
    }

    @Override
    public boolean UpdateNewPatrol(Patrol patrol) {
        return patrolMapper.UpdateNewPatrol(patrol);
    }

    @Override
    public boolean saveNew(Patrol patrol) {
        return patrolMapper.saveNew(patrol);
    }

    @Override
    public boolean deletepatrol(int patrolid) {
        return patrolMapper.deletepatrol(patrolid);
    }

    @Override
    public List<PatrolAndShiyanshi> selectMore2(String door, String device) {
        return patrolMapper.selectMore2(door,device);
    }

    @Override
    public List<PatrolAndShiyanshi> selectMore3(String device, String door, int userid) {
        return patrolMapper.selectMore3(device,door,userid);
    }


}




